-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
internal: Use rustup rust-analyzer component when there is a toolchain file override for the opened workspace #17667
Conversation
…rride for the opened workspace
@bors r+ |
☀️ Test successful - checks-actions |
// and if the toolchain of this override has a rust-analyzer component | ||
// if so, use the rust-analyzer component | ||
const toolchainTomlExists = await fileExists( | ||
vscode.Uri.joinPath(vscode.workspace.workspaceFolders[0]!.uri, "rust-toolchain.toml"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nb. this doesn't handle rust-toolchain
, but I think it's fine.
Wait, why does this one prefer a rustup-provided rust-analyzer over a bundled rust-analyzer? I'd expect that the bundled one would take priority. |
See the discussion in #17663, if the user explicitkly installed the rust-analyzer component in a toolchain override it is a big indicator they meant to use that instead. And a toolchain r-a is usually compatible with the toolchain where as the bundled one only supports the last couple stable releases |
Ah, I assumed that the presence of any |
Fixes #17663